import type { BanquetOrder } from "@/types/banquet";
import { defineStore } from "pinia";

const useAppStore = defineStore("app", {
  state: () => ({
    okey: "",
    order: {} as BanquetOrder,
  }),
  getters: {
    getOkey(): string {
      return this.okey;
    },
    getOrder(): BanquetOrder {
      return this.order;
    },
  },
  actions: {
    setOkey(key: string) {
      this.okey = key;
    },
    setOrder(order: BanquetOrder) {
      this.order = order;
    },
  },
  persist: {
    key: "app",
  },
});

export default useAppStore;
